package sctu.edu.java.year2016.team03.liyouhong.day20160524.chapter7_2;

import org.omg.CORBA.SetOverrideType;

/**
 * Created by Administrator on 2016/5/24 0024.
 * 2.尝试编写一个矩形类，将长与宽作为矩形类的属性，在构造方法中将长与宽初始化，定义一个
 * 成员方法求此矩形的面积。
 */
public class Rectangular {

    float myLong;
    float myWide;

    public Rectangular(float myLong,float myWide){

        this.myLong=myLong;
        this.myWide=myWide;

    }

    void sum(){
        System.out.println("mySum:"+myLong*myWide);

    }
}
